From: Florian Müllner Date: Wed, 10 Mar 2010 14:25:08 +0000 (+0100) Subject: [placeDisplay] Show a message when unmount fails X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~10297 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=cc8a95572e66db974af52234f5b9cf1daafc02db;p=gnome-shell.git [placeDisplay] Show a message when unmount fails When an unmount operation fails, the only feedback given currently is an exception on stderr. Use the infoBar to display an error message and allow the user to retry the operation. https://bugzilla.gnome.org/show_bug.cgi?id=612200 --- diff --git a/js/ui/placeDisplay.js b/js/ui/placeDisplay.js index 9e3ed87b0..67da06c65 100644 --- a/js/ui/placeDisplay.js +++ b/js/ui/placeDisplay.js @@ -97,7 +97,14 @@ PlaceDeviceInfo.prototype = { }, _removeFinish: function(o, res, data) { - this._mount.unmount_finish(res); + try { + this._mount.unmount_finish(res); + } catch (e) { + let message = _("Failed to unmount '%s'").format(o.get_name()); + Main.overview.infoBar.setMessage(message, + Lang.bind(this, this.remove), + _("Retry")); + } } };